package test;
//输入一个正整数x，判断该数是否为质数
import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        System.out.println("请输入一个整数");
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();
        boolean flag = false;
        for (int i = 2; i < number; i++) {
            if (number%i == 0){
                flag = true;
            }
        }
        if (flag == true){
            System.out.println(number+"不是质数");
        }else{
            System.out.println(number+"是质数");
        }
    }
}
